package com.jiang.books.common.validator;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

import com.jiang.books.domain.Book;

public class BookAuthorValidator implements ConstraintValidator<CheckBookAuthor, Book> {

	public void initialize(CheckBookAuthor constraintAnnotation) {
	}

	public boolean isValid(Book book, ConstraintValidatorContext context) {

		boolean result = true;
		
		/*
		if (customer.getCustomerType() != null && 
				(customer.isIndividualCustomer()
				&& (customer.getLastName() == null || customer.getGender() == null))
			) {
			result = false;
		}
		*/
		
		return result;
	}	
}